package DesignPatterns.FactoryMode.order;

import DesignPatterns.FactoryMode.coffee.AmericanCoffee;
import DesignPatterns.FactoryMode.coffee.LatteCoffee;

public class Coffee implements AbsCoffeeShopFactory{
    @Override
    public DesignPatterns.FactoryMode.coffee.Coffee createCoffee(String type) {
        DesignPatterns.FactoryMode.coffee.Coffee coffee=null;
        if("AmericanCoffee".equals(type)){
            coffee=new AmericanCoffee();
            coffee.setName("美式咖啡");
        }else if("LatteCoffee".equals(type)){
            coffee=new LatteCoffee();
            coffee.setName("拿铁咖啡");
        }return coffee;
    }

    @Override
    public void createDessert() {

    }


}
